from selenium.webdriver.common.by import By

from qiyeweixin_testing.page_object.base_page import BasePage


class HomePage(BasePage):

    __SWITCH_NAV = (By.XPATH, "//*[text()='通讯录']/..")

    def switch_address_book(self):
        self.do_find(self.__SWITCH_NAV).click()
        
        from qiyeweixin_testing.page_object.address_book_page import AddressBookPage
        return AddressBookPage(self.driver)